package com.is.add.util.DimensionUtil;

import com.is.add.model.OrderBase;

/**
 * 支付方式维度
 * Created by liuming on 2016/5/5.
 */
public class PayTypeDimension implements Dimension<OrderBase> {
    /**
     * 通过基础数据分析出维度对应key值
     *
     * @param baseBean 基础Bean
     * @return 维度key
     */
    @Override
    public String compare(OrderBase baseBean) {
        String payType=baseBean.getPayType();
        if (payType ==null){
            return "FREE-免费";
        }else if (payType.equals("支付宝")){
            return "ALIPAY-支付宝";
        }else if (payType.equals("会员卡")){
            return "VIP-会员卡";
        }else if (payType.equals("微信")){
            return "WEIXIN-微信";
        }else {
            return "OTHER-其它";
        }
    }

    @Override
    public String getTitle() {
        return "支付类型";
    }
}
